package xyz.hubery.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import xyz.hubery.domain.CashRecharge;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.hubery.domain.CashRechargeAuditRecord;
import xyz.hubery.model.BuyGCNParam;
import xyz.hubery.model.CashTradeVo;

public interface CashRechargeService extends IService<CashRecharge>{


    /**
     * 分页查询GCN充值记录
     * @param userId
     * @param userName
     * @param mobile
     * @param status
     * @param numMin
     * @param numMax
     * @param startTime
     * @param endTime
     * @param page
     * @return
     */
    Page<CashRecharge> findPage(Long userId, String userName, String mobile, Byte status, Integer numMin, Integer numMax, String startTime, String endTime, Page<CashRecharge> page);

    /**
     * 现金充值购买GCN
     * @param param
     * @return
     */
    CashTradeVo buy(Long userId, BuyGCNParam param);

    /**
     * 分页查询用户的充值记录
     * @param page
     * @param userId
     * @param status
     * @return
     */
    Page<CashRecharge> findCashRechargePage(Page<CashRecharge> page, Long userId, Byte status);

    /**
     * 场外交易充值审核
     * @param adminId 操作的管理员ID
     * @param cashRechargeAuditRecord 审核信息
     * @param businessType 业务类型
     * @return
     */
    boolean updateStatus(Long adminId, CashRechargeAuditRecord cashRechargeAuditRecord, String businessType);
}
